﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.Entities
{
    /// <summary>
    /// 新生报名(学生订单主表)
    /// </summary>
    [Table("Stu_StudentOrders")]
    public class StudentOrder : FullAuditedEntity<Guid>, IMustHaveTenant
    {
       
        public const int MaxNameLength = 50;
        public const int MaxMobileNoLength = 50;
        public const int MaxAccountLength = 50;
        public const int MaxOrderCodeLength = 50;
        public const int MaxENameLength = 50;
        public const int MaxMotherNameLength = 50;
        public const int MaxMotherJobLength = 50;
        public const int MaxMotherMobileNoLength = 50;
        public const int MaxFatherNameLength = 50;
        public const int MaxFatherJobLength = 50;
        public const int MaxFatherMobileNoLength = 50;
        public const int MaxCIDLength = 18;
        public const int MaxAddressLength = 100;
        public const int MaxOrderStatusLength = 50;
        /// <summary>
        /// 租户ID
        /// </summary>
        public int TenantId { get; set; }
        //主要信息
        [Description("订单编号")]
        [MaxLength(MaxOrderCodeLength)]
        public virtual string OrderCode { get; set; }
        [Required]//字段必填
        [MaxLength(MaxNameLength)]
        [Description("学生姓名")]
        public virtual string SName { get; set; }
        [Description("手机号")]
        [Required]
        [MaxLength(MaxMobileNoLength)]
        public virtual string MobileNo { get; set; }
        [Description("性别")]
        public virtual int Sex { get; set; }
        [Description("师生信账号")]
        [Required]
        [MaxLength(MaxAccountLength)]
        public virtual string Account { get; set; }
        [Description("下单时间")]
        public virtual DateTime OrderDate { get; set; }
        [Description("MaxOrderStatusLength")]
        [MaxLength(MaxOrderStatusLength)]
        public virtual string OrderStatus { get; set; }
        //--------------自定义信息---------
        [Description("英文名称")]
        [MaxLength(MaxENameLength)]
        public virtual string EName { get; set; }
        [Description("公立学校")]
        public virtual Guid? FullTimeSchoolId { get; set; }
        [Description("年级")]
        public virtual Guid? GradeId { get; set; }
        [Description("母亲姓名")]
        [MaxLength(MaxMotherNameLength)]
        public virtual string MotherName { get; set; }
        [Description("母亲电话")]
        [MaxLength(MaxMotherMobileNoLength)]
        public virtual string MotherMobileNo { get; set; }
        [Description("母亲职业")]
        [MaxLength(MaxMotherJobLength)]
        public virtual string MotherJob { get; set; }
        [Description("父亲名称")]
        [MaxLength(MaxFatherNameLength)]
        public virtual string FatherName { get; set; }
        [Description("父亲电话")]
        [MaxLength(MaxFatherMobileNoLength)]
        public virtual string FatherMobileNo { get; set; }
        [Description("父亲职业")]
        [MaxLength(MaxFatherJobLength)]
        public virtual string FatherJob { get; set; }
        [Description("就读班级")]
        public virtual Guid? ClassId { get; set; }
        [Description("出生日期")]
        public virtual DateTime Birthday { get; set; }
        [Description("身份证号码")]
        [MaxLength(MaxCIDLength)]
        public virtual string CID { get; set; }
        [Description("家庭地址")]
        [MaxLength(MaxAddressLength)]
        public virtual string Address { get; set; }

        public ICollection<StudentOrderItem> StudentOrderItems { get; set; }
    }
}
